using UnityEngine.UI;

public class DisplayGameTime : GenericDialog
{
	public Text minsecText;

	public Text hundredsText;

	private void OnEnable()
	{
		Reset();
	}

	private void LateUpdate()
	{
		UpdateTime(Game.levelTime);
	}

	private void UpdateTime(float timeInSeconds)
	{
		int minutes;
		int seconds;
		int hundreds;
		Utils.GetSplitedTime(timeInSeconds, out minutes, out seconds, out hundreds);
		minsecText.text = minutes.ToString("00") + ":" + seconds.ToString("00") + ".";
		hundredsText.text = hundreds.ToString("00");
	}

	public void Reset()
	{
		UpdateTime(0f);
	}
}
